using UnityEngine;
using System.Collections;

public class HittableObject : MonoBehaviour {

    public float m_Durability = 1;
    protected bool m_Active = true;
    public virtual void OnHit(float damage)
    {
        if (!m_Active) return;
        m_Durability -= damage;
        if (m_Durability <= 0)
        {
            OnHittableDestroy();
        }
    }
    protected virtual void OnHittableDestroy()
    {
 
    }
}
